package com.inwk.valoepi.pages;

import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;

import com.inwk.valoepi.managers.PageManager;

public class AboutPage extends Page {

	private String aboutPageXPathLocator = "//div[@id='ctl00_MiddleContent_BodyPanel']//p";
	
	@FindBy(xpath = "//form[@id='aspnetForm']/a")
	private WebElement goNextButton;
	
	public AboutPage(PageManager pm) {
		super(pm);
		//ensurePageLoaded(aboutPageXPathLocator);
	}
	
	
	public MainPage goNext() {
		goNextButton.click();
		return pm.mainPage;
	}

	@Override
	public boolean isCurrentPage() {
		return isElementPresent(aboutPageXPathLocator);
	}
}
